
#ifndef InfoDetailUI_hpp
#define InfoDetailUI_hpp

#include "IDialog.h"

class CardUI;

class CustomTableViewCell : public cocos2d::extension::TableViewCell
{
public:
    CustomTableViewCell();
    virtual void setIdx(ssize_t uIdx) override;
private:
    LayerColor* maskColorLayer;
    Label* lblSeat;
    Label* lblOut;
    Label* lblHand;
    std::vector<CardUI*> m_theOutCard;
    std::vector<CardUI*> m_theHandCard;
};

class InfoDetailUI : public IDialog<Layer>, public cocos2d::extension::TableViewDataSource, public cocos2d::extension::TableViewDelegate
{
public:
    InfoDetailUI();
    virtual ~InfoDetailUI();
    CREATE_FUNC(InfoDetailUI);

protected:
    virtual const char* csbName() const override {return "ui/InfoDetail.csb";}
    virtual void onUILoaded() override;

public:
    virtual void scrollViewDidScroll(cocos2d::extension::ScrollView* view)override {};
    virtual void scrollViewDidZoom(cocos2d::extension::ScrollView* view)override {}
    virtual void tableCellTouched(cocos2d::extension::TableView* table, cocos2d::extension::TableViewCell* cell)override;
    virtual cocos2d::Size tableCellSizeForIndex(cocos2d::extension::TableView *table, ssize_t idx)override;
    virtual cocos2d::extension::TableViewCell* tableCellAtIndex(cocos2d::extension::TableView *table, ssize_t idx)override;
    virtual ssize_t numberOfCellsInTableView(cocos2d::extension::TableView *table)override;

private:
    Button* m_close;
    
};

#endif

